package cn.fan;

import cn.fan.feign.clients.FundClient;
import cn.fan.feign.clients.UserClient;
import cn.fan.feign.config.FeignClientConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableCaching
@EnableFeignClients(clients = {FundClient.class, UserClient.class},defaultConfiguration = FeignClientConfiguration.class)
public class UserfundServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserfundServiceApplication.class, args);
    }

    @Bean
//    @LoadBalanced
    RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
